//
//	定数
//
var	const	PI = 3.1415926535;
var	const	SLIDER_HABA = 200;
var	const	BUTTONAREA = BUTTON_WIDTH*2;
var	const	MAXVERTEX = atoi(Modelrc( "Vertex" ));
var	const	MAXOBJECT = atoi(Modelrc( "Object" ));
var	const	MAXATTR = atoi(Modelrc( "Attr" ));
var	const	MAXSTATUS = 5;
var	const	MACHINE = Environ();
var	const	INPUT_KEY = ' ';
var	const	CURSOR = MOUSE_RIGHT;
var	const	INPUT = MOUSE_LEFT;
var	const	EXPERT = FALSE;
var	const	MAPPINGFILE = "Mapping1.bmp";
var	const	GENIEATRNAME = "_genie.atr";
var	const	MAPWIND = 256;
var	const	UVMAX = 1000;
var	const	error_msg1 =	 "３Ｄカーソルが点上にありません\n"
				+"最近点などを使って３Ｄカーソル\n"
				+"を点上に移動させてください";
var	const	error_msg2 = "指定された点は選択面にはありません";
var	const	error_msg3 = "面が選択されていません";
var	const	error_msg4 = "すでに確定した点と同じ点です";
var	const	error_msg5 = "移動元と移動先が同じです";
var	const	error_msg6 = "オブジェクト名には \"_\" , \"a-z\", \"A-Z\", \"0-9\" しか使えません。\n"+
			"ただし、オブジェクト名の最初は \"0-9\" で始まってはいけません。\n";
var	const	error_msg7 = "アトリビュート名には \"_\" , \"a-z\", \"A-Z\", \"0-9\" しか使えません。\n"+
			"ただし、アトリビュート名の最初は \"0-9\" で始まってはいけません。\n";

//
//	メニュー関係の表示順番
//
var	const	Menu_file = 0;
var	const	Menu_select = 1;
var	const	Menu_create = 2;
var	const	Menu_edit = 3;
var	const	Menu_trans = 4;
var	const	Menu_disp = 5;
var	const	Menu_control = 6;
var	const	Menu_atrobj = 7;
var	const	Menu_help = 8;
var	const	Menu_mode = 9;

var	const	Menu_Title = 0;

//
//	ステータスバー表示
//
var	const	StatusMesh_pos = 1;
var	const	StatusZoom_pos = 2;

//
//	デフォルト値
//
var	default_objname = "obj";
var	default_filename = "obj.suf";
var	default_atrname = "noname";
var	default_atrcode = 7;
var	default_atrfile = "noname.atr";
var	default_zoomsize = 4;
var	input_button = INPUT;
var	cursor_button = CURSOR;
var	pers_deg = 60;
var	Equilateral_kakusu = 12;
var	Rotation_kakusu = 12;
var	Ball_level = 1;
var	meshdisp_flag = ON;
var	housendisp_flag = OFF;
var	tendisp_flag = ON;
var	buttondisp_flag = ON;
var	novice_flag = ON;
var	tosha_flag = ON;
var	drawinvisible_flag = FALSE;
var	vecvisible_len = 50;
var	mouse_grid = 10;
var	mesh_grid = 100;

//
//	広域変数
//
var	AreaMode = SELECT_SUB;
var	zoomsize = default_zoomsize;
var	cur = Vertex( 0, 0, 0 );
var	prevnext_sel;
var	prevnext_selno = 0;
var	prevnext_flag = FALSE;
var	input_flag = ON;
var	invisible_flag = FALSE ;
var	quit_flag = FALSE;
var	draw_mode = OFF;
var	polycheck_flag = OFF;
var	statustext = "";
var	Status_title[MAXSTATUS];
var	Status_org[MAXSTATUS];
var	pers_rotation_flag = FALSE;
var	pers_rotation_vec = vector(0,0,0);
var	pers_pos_vec = vector(0,0,0);
var	pers_rotate_mat;
var	pers_mat;
var	model_dir;

//ボタンＩＤ
var	moveupper_id;
var	moveleft_id;
var	moveright_id;
var	movelower_id;
var	rotupper_id;
var	rotleft_id;
var	rotright_id;
var	rotlower_id;
var	turnleft_id;
var	turnright_id;
var	moveback_id;
var	movefront_id;
var	zoomup_id;
var	zoomdown_id;
var	nearvertex_id;
var	fit_id;
var	center_id;
var	allsave_id;
var	load_id;
var	save0_id;
var	load0_id;
var	save1_id;
var	load1_id;
var	save2_id;
var	load2_id;

var	const	MAX_SLIDER_NUM1 = 10;
var	slider_number1[MAX_SLIDER_NUM1];
slider_number1 = { 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000 };
var	const	MAX_SLIDER_NUM2 = 10;
var	slider_number2[MAX_SLIDER_NUM2];
slider_number2 = { 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000};
var	const	MAX_ZOOM_NUM = 10;
var	zoom_number[MAX_ZOOM_NUM];
zoom_number = { 1, 2, 4, 5, 10, 20, 40, 50, 100, 200 };

//
//	ＵＮＤＯバッファ関係
//
var	const	max_hold_number = 3;
var	hold_objname[max_hold_number][MAXOBJECT];
var	hold_objfile[max_hold_number][MAXOBJECT];
var	hold_objflag[max_hold_number][MAXOBJECT];
var	hold_objnumber[max_hold_number];
var	hold_invisibleflag[max_hold_number];
var	hold_objsel[max_hold_number][MAXOBJECT];
var	hold_sel[max_hold_number][2];
